#! /usr/bin/env python
# -*- encoding: utf-8 -*-
# Author: Aquila
# Created Time: 2012-02-10 15:32:17
# File Name: /var/www/run_boss_uwsgi.py
# Description: 
import os,sys
from os.path import abspath, dirname, join
import site
# reload(sys)
# sys.setdefaultencoding('utf-8')
site.addsitedir('/usr/local/lib/python3.6/site-packages')

project_path = [abspath(join(dirname(__file__), '../..')), abspath(join(dirname(__file__), '..')),
                abspath(dirname(__file__))]
for project_root in project_path:
    if project_root not in sys.path[:1]:
        sys.path.insert(0, project_root)
os.environ['DJANGO_SETTINGS_MODULE'] = 'traffic.settings'
os.environ['PYTHON_EGG_CACHE'] = '/tmp'

from django.core.wsgi import get_wsgi_application

application = get_wsgi_application()



# import uwsgi
# from uwsgidecorators import timer
# from django.utils import autoreload
 
# @timer(3)
# def change_code_gracefull_reload(sig):
    # if autoreload.code_changed():
        # uwsgi.reload()

